<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html lang="en">
<head>
	<title>搜索结果列表</title>
	<%@include file="common/head.jsp"%>
</head>

<body>
<div id="navbar" class="navbar navbar-default">
	<div id="navbar-container" class="navbar-container">
		<div class="navbar-header pull-left">
			<a class="navbar-brand" href="#">
				<small>
					<i class="icon-leaf"></i>
					音像商店管理系统
				</small>
			</a><!-- /.brand -->
		</div><!-- /.navbar-header -->
	</div><!-- /.container -->
</div>

<div class="main-container" id="main-container">
	<div class="main-container-inner">
		<div class="main-content" style="margin-left:0;">
			<div class="page-content">
				<div class="row">
					<div class="col-xs-12">
						<!-- PAGE CONTENT BEGINS -->
						<div class="row">
							<div class="col-xs-12">
								<div class="page-header">
									<h1>
										搜索结果列表
									</h1>
								</div>
								<ul class="list-group">
									<c:if test="${empty productList}">暂无记录</c:if>
									<c:forEach items="${productList}" var="p">
										<li class="list-group-item clearfix">
											<h2>${p.name}</h2>
											<div class="col-sm-2">
												<img src="/resources/img/default.jpg" class="img-responsive">
											</div>
											<div class="col-sm-10">
												<h3>共有<span>${p.totalNum}</span></h3>
												<h3>现有<span>${p.totalNum - p.borrowedNum}</span></h3>
												<button class="btn btn-primary" <c:if test="${p.totalNum == p.borrowedNum}"> disabled="disabled"</c:if> onclick="window.location.href='${website}${p.id}'">
													<i class="icon-check"></i>预约
												</button>
											</div>
										</li>
									</c:forEach>
								</ul>
							</div>
						</div>
						<!-- PAGE CONTENT ENDS -->
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.page-content -->
		</div><!-- /.main-content -->
	</div><!-- /.main-container-inner -->

	<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
		<i class="icon-double-angle-up icon-only bigger-110"></i>
	</a>
</div><!-- /.main-container -->

<%@include file="common/footer.jsp" %>
</body>
</html>